﻿@model IEnumerable<Senac.ProjetoIntegrador.EducacaoWeb.Models.Professor>

@{
    ViewBag.Title = "Index";
}

<h2>PROFESSOR</h2>

<table class="table">
    <tr>
        <th>
            Nome
        </th>
        <th>
            Disciplina
        </th>
        <th>
            Usuário
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Nome)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Disciplina)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Usuario.Login)
        </td>
        <td>
        <div class="btn">
            @Html.ActionLink("Editar", "Edit", new { id=item.ProfessorID })
        </div>
        <div class="btn">
            @Html.ActionLink("Deletar", "Delete", new { id=item.ProfessorID })
        </div>
        </td>
    </tr>
}

</table>

<p>
    <div class="btn btn-danger">
    @Html.ActionLink("Criar novo professor", "Create")
    </div>
</p>